package org.lex.elec.model;

public class AppException extends Exception {
	private static final long serialVersionUID = -6482832638026600847L;
	private final ErrorCode errorCode;

	public AppException(ErrorCode errorCode, String message) {
		this(errorCode, message, null);
	}

	public AppException(ErrorCode errorCode, Throwable cause) {
		this(errorCode, null, cause);
	}

	public AppException(ErrorCode errorCode, String message, Throwable cause) {
		super(message, cause);
		this.errorCode = errorCode;
	}

	public ErrorCode getErrorCode() {
		return errorCode;
	}
}
